/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import java.util.Map;
import thesis.haipv.qa.model.UserProfile;
import thesis.haipv.qa.persistence.QuestionDAO;

/**
 *
 * @author PHANHAI
 */
public class PostQuestion extends ActionSupport {
    
    private String contentQuestion;
    
    @Override
    public String execute() throws Exception {
        long createtime = System.currentTimeMillis();
        QuestionDAO dao = new QuestionDAO();
        Map session = ActionContext.getContext().getSession();
        UserProfile user = (UserProfile) session.get("user");
       // dao.createQuestion(contentQuestion, user.getAccountId(), createtime);
        return SUCCESS;
    }

    public void setContentQuestion(String contentQuestion) {
        this.contentQuestion = contentQuestion;
    }
    
    
}
